<div class="content-inner">
	<div class="marg20-btm">
                             <a href=<?php echo site_url('backend_pages/member'); ?> class="btn btn-primary">&hearts; View Members </a>
                         </div>
<form action=<?php echo site_url('backend_pages/update_member'); ?> method="post" class="form-horizontal" />
		 

	<?php 
	if($admin_acc->num_rows() >0){
       foreach($admin_acc->result() as $row){
	
	//echo form_open('backend_pages/addmember','post');
		$username = array(
		  'name' => 'username',
		  'value' => $row->user_name,
		  'id' => 'input01',
		  'required' => '',
		  'placeholder' => 'Your username ',
		  'class' => 'input-xlarge'
			);
		$getid = array(
		  'name' => 'getid',
		  'value' => $row->user_ID,
		  'id' => 'input01',
		  'class' => 'input-xlarge',
		  'type' => 'hidden'
			);
		$password = array(
			'name' => 'pass',
			'value' => $row->password,
			'id' => 'input01',
			'required' => '',
			'placeholder' => 'Your password',
			'class' => 'input-xlarge',
			'type' => 'password'
					);
		$confirm_pass = array(
			'name' => 'conf_pass',
			'id' => 'input01',
			'value' => $row->password, 
		    'required' => '',
		    'class' => 'input-xlarge',
			'placeholder' => 'Retype password',
			'required' => '',
			'type' => 'password'
			);
		$email = array(
			'name' => 'email',
			'value' => $row->e_mail,
			'id' => 'input01',
			'placeholder' => 'Your email',
			'required' => '',
			'type' => 'email'
			);
		$gender = array(
			$row->gender => $row->gender,
			'M' => 'Male',
			'F' => 'Female',
			'O' => 'Other'
			);
		$role = array(
			$row->role_ID => $row->role_name,
			'1' => 'Administrator',
			'2' => 'Simple User'
			);
		$phone = array(
			'name' => 'phone',
			'id' => 'input01',
		    'class' => 'input-xlarge',
			'required' => '',
			'placeholder' => 'phone number',
			'required' => '',
			'value' => $row->phone

			);
		$address = array(
		 'name' => 'address',
		 'id' => 'input01',
		 'class' => 'input-xlarge',
		 'placeholder' => 'Your address',
		 'required' => '',
		 'value' => $row->address,
		 'rows'        => '5',
		 'cols'        => '10',
		 'style'       => 'width:30%'
		 );

		}
	 }
	?>
   <div class="control-group">
   
    <?php
           echo '<div class="controls">
		   <span style="color:red; margin-left:12px;">' . validation_errors('&times;') . '</span>
		   </div>';
         ?>
       <label class="control-label" for="input01">UserName </label>
       <div class="controls">
         <?php echo form_input($username); ?>
         <?php echo form_input($getid); ?>
       </div>
     </div>
     <div class="control-group">
       <label class="control-label" for="input01">Password </label>
       <div class="controls">
          <?php echo form_password($password);?>
       </div>
     </div>
     <div class="control-group">
       <label class="control-label" for="input01">Confirm Password </label>
       <div class="controls">
         <?php echo form_password($confirm_pass);?>
       </div>
     </div>
     <div class="control-group">
       <label class="control-label" for="input01">Emial Active </label>
       <div class="controls">
         <?php echo form_input($email);?>
       </div>
     </div>
     <div class="control-group">
       <label class="control-label" for="input01">Phone Number </label>
       <div class="controls">
         <?php echo form_input($phone);?>
       </div>
     </div>
     <div class="control-group">
       <label class="control-label" for="input01">Gender </label>
       <div class="controls">
         <?php echo form_dropdown('gender',$gender);?>
       </div>
     </div>
     <div class="control-group">
       <label class="control-label" for="input01">User Role </label>
       <div class="controls">
         <?php echo form_dropdown('role',$role);?>
       </div>
     </div>
     <div class="control-group">
       <label class="control-label" for="input01">Your Address</label>
       <div class="controls">
         <?php  echo form_textarea($address); ?>
       </div>
     </div>
     <div class="form-actions">
         <button type="submit" class="btn btn-primary">Save </button>
         <a href="./allmember.html" class="btn">Cancel </a>
     </div>
 </form> 
    